package cn.tedu.mall.product.utils;

import org.springframework.web.client.RestTemplate;

public class IdUtils {
    private static final RestTemplate REST_TEMPLATE=new RestTemplate();

    public static Long getId(String feature){
        String url="http://localhost:9111/api/segment/get/"+feature;
        String id=REST_TEMPLATE.getForObject(url,String.class);
        return Long.parseLong(id);
    }
}
